package com.yilin.reggie.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yilin.reggie.common.CustomException;
import com.yilin.reggie.domain.Category;
import com.yilin.reggie.domain.Dish;
import com.yilin.reggie.domain.Setmeal;
import com.yilin.reggie.domain.SetmealDish;
import com.yilin.reggie.dto.DishDto;
import org.springframework.transaction.annotation.Transactional;

import java.util.List;

public interface DishService extends IService<Dish> {


    //新增菜品,同时插入菜品对应的口味数据，需要操作两张表
    public void saveWithFlavor(DishDto dishDto);
    //根据id查询菜品信息和菜品口味
    public DishDto getByIdWithFlavor(Long id);

    //更新菜品信息和口味信息
    public void updeteWithFlavor(DishDto dishDto);

    /**
     * 删除菜品，同时删除菜品和口味的关联数据
     * @param ids
     */
    public void removeWithDish(List<Long> ids);
}
